<@childChannel channels=channelList deep=0/>

<#macro childChannel channels deep>
    <#list channels as c>
        <option value="${c.id}"
        <#if channelIds?seq_contains(c.id)> selected="selectd"</#if>
        >
        <#if deep gt 0>
            <#list 1..deep as i>&nbsp; &nbsp;</#list>
            >
        </#if>
       <#if (c.name)?? > ${c.name} </#if></option>
        <#if (c.child)?? >
            <#if c.child?size gt 0>
                <@childChannel channels=c.child deep=deep+1/>
            </#if>
        </#if>
    </#list>
</#macro>